package com.lyz.dataStructure.huawei;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/4/15 20:04
 *@Description:
 **/
/*
11 10 20 40 32 67 40 20 89 300  400  15
 */

public class Test3 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        while(input.hasNext()){
            int n = input.nextInt();
            int[] arr = new int[n];
            for(int i =0;i<n;i++){
                arr[i] = input.nextInt();
            }
             Arrays.sort(arr);
            for(int i =1; i<n;i++){
                System.out.println(arr[0]);
                if(arr[i]!=arr[i-1]){
                    System.out.println(arr[i]);
                }
            }
        }
    }
}
